<%
layout("/layouts/platform.html"){
%>
<header class="header navbar bg-white shadow">
    <div class="btn-group tool-button">
        <a class="btn btn-primary navbar-btn" href="${base}/platform/store/store" data-pjax><i class="ti-angle-left"></i> 返回</a>
    </div>
</header>

<div class="content-wrap">
    <div class="wrapper" style="min-height:500px;">
        <section class="panel panel-form">
            <form id="addForm" role="form" class="form-horizontal parsley-form" data-parsley-validate
                  action="${base}/platform/store/store/addDo" method="post">
                <div class="row mb10">
                    <div class="col-lg-12">
                        <div class="form-group">
                            <label for="companyName" class="col-sm-2 control-label">公司名称</label>
                            <div class="col-sm-8">
                            <input type="text" id="companyName" class="form-control" name="companyName" data-parsley-required="true" placeholder="公司名称">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="level" class="col-sm-2 control-label">等级</label>
                            <div class="col-sm-8">
                            <input type="text" id="level" class="form-control" name="level" data-parsley-required="true" placeholder="等级">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="telphone" class="col-sm-2 control-label">联系电话</label>
                            <div class="col-sm-8">
                            <input type="text" id="telphone" class="form-control" name="telphone" data-parsley-required="true" placeholder="联系电话">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="address" class="col-sm-2 control-label">地址</label>
                            <div class="col-sm-8">
                            <input type="text" id="address" class="form-control" name="address" data-parsley-required="true" placeholder="地址">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="keyword" class="col-sm-2 control-label">关键词</label>
                            <div class="col-sm-8">
                            <input type="text" id="keyword" class="form-control" name="keyword" data-parsley-required="true" placeholder="关键词">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="contactsName" class="col-sm-2 control-label">联系人</label>
                            <div class="col-sm-8">
                            <input type="text" id="contactsName" class="form-control" name="contactsName" data-parsley-required="true" placeholder="联系人">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="mainBusiness" class="col-sm-2 control-label">主营业务</label>
                            <div class="col-sm-8">
                            <input type="text" id="mainBusiness" class="form-control" name="mainBusiness" data-parsley-required="true" placeholder="主营业务">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="website" class="col-sm-2 control-label">公司网站地址</label>
                            <div class="col-sm-8">
                            <input type="text" id="website" class="form-control" name="website" data-parsley-required="true" placeholder="公司网站地址">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="oldopBy" class="col-sm-2 control-label">原业务员</label>
                            <div class="col-sm-8">
                            <input type="text" id="oldopBy" class="form-control" name="oldopBy" data-parsley-required="true" placeholder="原业务员">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="mobile" class="col-sm-2 control-label">手机号码</label>
                            <div class="col-sm-8">
                            <input type="text" id="mobile" class="form-control" name="mobile" data-parsley-required="true" placeholder="手机号码">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-3"></div>
                <div class="col-lg-6">
                    <div class="form-group text-center">
                        <label></label>

                        <div>
                            <button class="btn btn-primary btn-block btn-lg btn-parsley" data-loading-text="正在提交...">提 交</button>
                        </div>
                    </div>
                </div>
            </form>
        </section>
    </div>
</div>
<script language="JavaScript">
    $(document).ready(function () {
        $('#addForm').ajaxForm({
            dataType: 'json',
            beforeSubmit: function (arr, form, options) {
                form.find("button:submit").button("loading");
            },
            success: function (data, statusText, xhr, form) {
                if (data.code == 0) {
                    Toast.success(data.msg);
                    form.resetForm();
                } else {
                    Toast.error(data.msg);
                }
                form.find("button:submit").button("reset");
            }
        });
    });
</script>
<%}%>


